package com.ys.web.yinsheng.mapper;

import com.ys.base.BaseDao;
import com.ys.web.yinsheng.model.UserMerchant;
import com.ys.web.yinsheng.model.YinShengMerchantInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * @Author: dhf
 * @ClassName: YinShengMapper
 * @Date: 2022/7/21 14:46
 * @Description:
 * @Version: 1.0
 */
public interface YinShengMapper extends BaseDao {
    int insert(YinShengMerchantInfo yinShengMerchantInfo);

    UserMerchant userMerchant(@Param("uid") String uid);

    /**
     * @作者: dhf
     * @名称: 收取手续费账户
     * @param
     * @时间: 2022/8/15 9:29
     * @备注:
     * @返回值: java.util.Map<java.lang.String, java.lang.Object>
     */
    Map<String,Object> collectionUser();

    /**
     * @作者: dhf
     * @名称: 添加手续费账户累计资金
     * @param uid
     * @param fee
     * @时间: 2022/8/15 9:29
     * @备注:
     * @返回值: int
     */
    int collectionUserMoney(@Param("uid")long uid, @Param("fee")long fee);


    @Select("select count(id) from user_bank where user_id=#{userId}")
    int getUserBankCount(@Param("userId") Long userId);
}
